.class public Les/ix;
.super Lcom/estrongs/android/ui/dialog/q;
.source "NewDownloadDialog.java"


# instance fields
.field private a:Landroid/widget/EditText;

.field private b:Landroid/widget/EditText;


# direct methods
.method public constructor <init>(Landroid/app/Activity;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, v0}, Les/ix;-><init>(Landroid/app/Activity;Ljava/lang/String;)V

    return-void
.end method

.method public constructor <init>(Landroid/app/Activity;Ljava/lang/String;)V
    .locals 5

    .line 2
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/dialog/q;-><init>(Landroid/content/Context;)V

    const v0, 0x7f110041

    .line 3
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/dialog/q;->setTitle(I)V

    .line 4
    invoke-static {p1}, Lcom/estrongs/android/pop/esclasses/h;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v0

    const v1, 0x7f0c0294

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v0

    .line 5
    invoke-virtual {p0, v0}, Lcom/estrongs/android/ui/dialog/q;->setContentView(Landroid/view/View;)V

    const/high16 v1, 0x40c00000    # 6.0f

    .line 6
    invoke-static {p1, v1}, Les/fy;->a(Landroid/content/Context;F)I

    move-result v1

    const v2, 0x7f090338

    .line 7
    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/EditText;

    iput-object v2, p0, Les/ix;->a:Landroid/widget/EditText;

    .line 8
    invoke-static {p2}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 9
    iget-object v2, p0, Les/ix;->a:Landroid/widget/EditText;

    invoke-virtual {v2, p2}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V

    .line 10
    :cond_0
    iget-object p2, p0, Les/ix;->a:Landroid/widget/EditText;

    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v2

    const v3, 0x7f060294

    invoke-virtual {v2, v3}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v2

    invoke-virtual {p2, v2}, Landroid/widget/EditText;->setTextColor(I)V

    .line 11
    iget-object p2, p0, Les/ix;->a:Landroid/widget/EditText;

    const v2, 0x7f080813

    invoke-virtual {p2, v2}, Landroid/widget/EditText;->setBackgroundResource(I)V

    .line 12
    iget-object p2, p0, Les/ix;->a:Landroid/widget/EditText;

    const/4 v4, 0x0

    invoke-virtual {p2, v1, v4, v1, v4}, Landroid/widget/EditText;->setPadding(IIII)V

    const p2, 0x7f09033a

    .line 13
    invoke-virtual {v0, p2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p2

    check-cast p2, Landroid/widget/EditText;

    iput-object p2, p0, Les/ix;->b:Landroid/widget/EditText;

    .line 14
    invoke-static {}, Lcom/estrongs/android/ui/theme/b;->r()Lcom/estrongs/android/ui/theme/b;

    move-result-object v0

    invoke-virtual {v0, v3}, Lcom/estrongs/android/ui/theme/b;->a(I)I

    move-result v0

    invoke-virtual {p2, v0}, Landroid/widget/EditText;->setTextColor(I)V

    .line 15
    iget-object p2, p0, Les/ix;->b:Landroid/widget/EditText;

    invoke-virtual {p2, v2}, Landroid/widget/EditText;->setBackgroundResource(I)V

    .line 16
    iget-object p2, p0, Les/ix;->b:Landroid/widget/EditText;

    invoke-virtual {p2, v1, v4, v1, v4}, Landroid/widget/EditText;->setPadding(IIII)V

    .line 17
    invoke-static {}, Lcom/estrongs/android/pop/utils/q;->b()Z

    move-result p2

    const v0, 0x7f110320

    if-eqz p2, :cond_1

    .line 18
    invoke-virtual {p1, v0}, Landroid/app/Activity;->getText(I)Ljava/lang/CharSequence;

    move-result-object p2

    new-instance v0, Les/ix$a;

    invoke-direct {v0, p0, p1}, Les/ix$a;-><init>(Les/ix;Landroid/app/Activity;)V

    invoke-virtual {p0, p2, v0}, Lcom/estrongs/android/ui/dialog/q;->setConfirmButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/widget/Button;

    const p2, 0x7f110321

    .line 19
    invoke-virtual {p1, p2}, Landroid/app/Activity;->getText(I)Ljava/lang/CharSequence;

    move-result-object p2

    new-instance v0, Les/ix$b;

    invoke-direct {v0, p0, p1}, Les/ix$b;-><init>(Les/ix;Landroid/app/Activity;)V

    invoke-virtual {p0, p2, v0}, Lcom/estrongs/android/ui/dialog/q;->setCancelButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)Landroid/widget/Button;

    goto :goto_0

    .line 20
    :cond_1
    invoke-virtual {p1, v0}, Landroid/app/Activity;->getText(I)Ljava/lang/CharSequence;

    move-result-object p2

    new-instance v0, Les/ix$c;

    invoke-direct {v0, p0, p1}, Les/ix$c;-><init>(Les/ix;Landroid/app/Activity;)V

    invoke-virtual {p0, p2, v0}, Lcom/estrongs/android/ui/dialog/q;->setSingleButton(Ljava/lang/CharSequence;Landroid/content/DialogInterface$OnClickListener;)V

    .line 21
    :goto_0
    invoke-virtual {p0}, Lcom/estrongs/android/ui/dialog/q;->requestInputMethod()V

    return-void
.end method

.method static synthetic a(Les/ix;)Landroid/widget/EditText;
    .locals 0

    .line 1
    iget-object p0, p0, Les/ix;->a:Landroid/widget/EditText;

    return-object p0
.end method

.method static synthetic a(Les/ix;Ljava/lang/String;)Z
    .locals 0

    .line 2
    invoke-direct {p0, p1}, Les/ix;->a(Ljava/lang/String;)Z

    move-result p0

    return p0
.end method

.method private a(Ljava/lang/String;)Z
    .locals 3

    .line 3
    invoke-static {p1}, Lcom/estrongs/android/util/o0;->b(Ljava/lang/CharSequence;)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    .line 4
    invoke-virtual {p1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;

    move-result-object p1

    const-string v0, "ftp://"

    .line 5
    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "ftps://"

    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "sftp://"

    .line 6
    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "http://"

    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-nez v0, :cond_0

    const-string v0, "https://"

    .line 7
    invoke-virtual {p1, v0}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result p1

    if-eqz p1, :cond_1

    :cond_0
    const/4 p1, 0x1

    goto :goto_0

    :cond_1
    const/4 p1, 0x0

    :goto_0
    if-nez p1, :cond_2

    .line 8
    invoke-virtual {p0}, Landroid/app/Dialog;->getContext()Landroid/content/Context;

    move-result-object v0

    const v2, 0x7f110b25

    invoke-static {v0, v2, v1}, Lcom/estrongs/android/ui/view/d;->a(Landroid/content/Context;II)V

    :cond_2
    return p1
.end method

.method static synthetic b(Les/ix;)Landroid/widget/EditText;
    .locals 0

    .line 1
    iget-object p0, p0, Les/ix;->b:Landroid/widget/EditText;

    return-object p0
.end method
